Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODFacet


CreateCanvas

The CreateCanvas method creates a canvas object.

ODCanvas CreateCanvas (in ODGraphicsSystem graphicsSystem,
                       in ODPlatformCanvas platformCanvas,
                       in ODBoolean isDynamic,
                       in ODBoolean isOffscreen);
graphicsSystem
A 16-bit value specifying the graphics system you want to use for the canvas. Valid values for graphicsSystem are platform-dependent.
platformCanvas
A 32-bit value identifying the graphics-system-specific drawing structure to assign to the canvas, or kODNULL for no drawing structure. Valid values for platformCanvas are graphics-system-dependent.
isDynamic
kODTrue if this canvas is to be dynamic, otherwise kODFalse.
isOffscreen
kODTrue if this canvas is to be offscreen, otherwise kODFalse.
return value
A reference to a new canvas object.
DISCUSSION
Your part calls this method to create an offscreen canvas object to attach to this facet. To create a canvas that will not be attached to any facet, call the window-state object's CreateCanvas method.

On the Mac OS platform, the graphics system may be either QuickDraw (kODQuickDraw) or QuickDraw GX (kODQuickDrawGX). For QuickDraw, the platform canvas should be a QuickDraw graphics port (type GrafPtr); for QuickDraw GX, it should be a QuickDraw GX view port object (type gxViewPort).

SEE ALSO
The ODGraphicsSystem type (page 883).
The ODWindowState::CreateCanvas method (page 856).
The ODCanvas class (page 62).
"Adding and Removing Canvases" on page 133 in OpenDoc Programmer's Guide.
"Printing the Document" on page 174 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help